home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / btrieve / btrv.txt < prev    next >
Text File  |  1993-02-27  |  23KB  |  675 lines

  1. MARXMENU DATABASE FUNCTIONS
  2.  
  3. Well, after talking about it for years, version 2.42 now includes a
  4. strong set of database tools. The database is based on Novell's Btrieve
  5. interface. Thus it has the reliability of proven database technology. We
  6. are pushing Btrieve to the limit and then some in order to get the
  7. requirements needed from a database engine.
  8.  
  9. As of version 2.42 about 90% of the features of Btrieve have been
  10. implemented in MarxMenu. So if you are familiar with Btrieve
  11. already you will be able to do most things just like you're used to.
  12.  
  13. Btrieve is primarily a fixed length database engine with the ability to
  14. add a single variable length field on the end of a record. When using
  15. MarxMenu with Btrieve, we typically store MarxMenu style variables in
  16. the variable length section and reserve the fixed length section for key
  17. fields only. While we recommend you too consider this approach you are
  18. free to develop and use any data models you prefer.
  19.  
  20. You will notice several unusual things about MarxMenu as a database.
  21. We decided that the square model or relationally linked square model is
  22. to limiting. You can do square model databases if you want to, but the
  23. experience of getting rid of the square model is like an animal being
  24. let out of a cage for the first time. It's a little scary at first.
  25.  
  26. When you create a MarxMenu Btrieve database you may define all your
  27. fields, if you want, but you are only required to define the fields that
  28. will be used as key fields. You will need to define the fields type, and
  29. for key fields the key properties.
  30.  
  31. When data is written to a file the data is passed as a MarxMenu array.
  32. The first elements of the array have to match the fixed potion of you
  33. structure, normally your key fields. Any elements after the key fields
  34. are written in MarxMenu format to the variable length section of the
  35. record. Thus after the key fields you can do whatever you want. Here's a
  36. list of some of the flexible features.
  37.  
  38.  1) Records do not have to contain the same fields or the same number of
  39.     fields. You can have 20 fields in one record and 5 fields in the
  40.     next one. There are no rules that the data in one field of a record
  41.     has to be of the same data type as the same field of the previous
  42.     record.
  43.  
  44.  2) Records can contain MarxMenu style arrays. Thus if you are using a
  45.     phone field as an array of phone numbers you can store as many phone
  46.     numbers in that field as you want. MarxMenu can support arrays
  47.     within arrays of up to 30 levels within a single record.
  48.  
  49.  3) Since MarxMenu supports writing MarxMenu style variable structures
  50.     to database records, you need not have to specify the type of data,
  51.     the data size, or the structure of the data before you access the
  52.     file. If you want to write data you just do it.
  53.  
  54. Since this code is new you may want a lot of new features added to go
  55. along with what's provided so far. Feel free to call with suggestions,
  56. we are interested in hearing how this is working out for you.
  57.  
  58. Use of the Btreive commands require that you have Btrieve 6.0 or 5.10.
  59. You will need to have Btrieve NLM running on the server and BRequest
  60. running on the workstation to use this database. All the Btreive
  61. database commands start with the BTRV prefix.
  62.  
  63. Only network versions of MarxMenu contain the BTRV database commands,
  64. the single user version is not equiped with this feature.
  65.  
  66.  
  67. BtrvAbortTransaction
  68. BtrvAbortTransaction is used to about all changes to the file that have
  69. occurred since the BtrvBeginTransaction was executed.
  70.  
  71. See Also: BtrvBeginTransaction, BtrvEndTransaction
  72.  
  73. Category: Btrieve
  74.  
  75.  
  76. BtrvBeginTransaction
  77. Betrieve supports a concept called transaction tracking. With
  78. transaction tracking you can use the BtrvBeginTransaction command to set
  79. a file condition flag marking the start of a file process. Should the
  80. file process be interupted before the end of the process the files will
  81. be restored to the original condition they were in prior to the
  82. BtrvBeginTransaction.
  83.  
  84. See Also: BtrvAbortTransaction, BtrvEndTransaction
  85.  
  86. Category: Btrieve
  87.  
  88.  
  89. BtrvClearOwner (Handle)
  90. BtrvClearOwner clears the owner and allows normal access to the file.
  91.  
  92.  Example:
  93.    BtrvClearOwner (Handle)
  94.  
  95. See Also: BtrvSetOwner
  96.  
  97. Category: Btrieve
  98.  
  99.  
  100. BtrvClose (Handle)
  101. BtrvClose closes the file. The parameter `Handle' is the file handle
  102. returned from BtrvOpen.
  103.  
  104.  Example:
  105.    BtrvClose (Handle)
  106.  
  107. See Also: BtrvOpen
  108.  
  109. Category: Btrieve
  110.  
  111.  
  112. BtrvCreate (FileName,Fields)
  113. BtrvCreate is the most complicated Btrieve call. It defines the creation
  114. of the Btrieve database. The fields parameter is a two dimensional
  115. MarxMenu array that describes the fields in the file. It is designed to
  116. support either standard Btrieve fixed length fields or MarxMenu key
  117. fields. Using MarxMenu fields is the easiest because you only have to
  118. define the key fields.  Non-Key fields do not have to be predefined.
  119.  
  120. The easiest way to define these fields is to create a comma delimited
  121. text file and use ReadAscTextFile('FIELDS.TXT',Fields). This will create
  122. the array needed by BtrvCreate. The text file might look as follows:
  123.  
  124.    Name,String,35,Key,DUP,MOD,UPPER,DEC
  125.    CustomerNumber,Auto
  126.    From,String,35
  127.    Password,String,15
  128.    Access,Num
  129.    Flags,String,10
  130.    FirstDate,Date
  131.    LastDate,Date
  132.    Calls,Num
  133.    CallTime,Time
  134.    Phone,String,15
  135.  
  136.  Example:
  137.    ReadAscTextFile('FIELDS.TXT',Fields)
  138.    BtrvCreate('BBSUSER.BTD',Fields)
  139.  
  140. The above example creates a conventional fixed length database with one
  141. key field, the "name" field. Each line in the defination file defines a
  142. new field. Each line has at least two parameters. The first parameter is
  143. the field name. It is followed by the field type. There are five legal
  144. field types.  They are:
  145.  
  146.   String - Containes alphanumeric strings. String fields have a required
  147.            third parameter, the maximum length of the string. In the
  148.            above example the "Name" and "From" fields both have max
  149.            lengths of 35 characters.
  150.  
  151.   Num    - Integer numeric fields. This field type supports storing
  152.            integer numbers.
  153.  
  154.   Date   - Dates fields. The DOS country code is automatically supported
  155.            to establish date format. If not specified, the default
  156.            format is "MM/DD/YY".
  157.  
  158.   Time   - Time fields. This command also reads the DOS country code to
  159.            establish the proper format.  Otherwise default is "HH:MM:SS".
  160.  
  161.   Auto   - Auto increment fields. This field is used to maintain field
  162.            counters. This field is more complicated than most. Normally
  163.            in your record mask you should provide a value of zero, this
  164.            will cause the value stored in the file to be one more than
  165.            the value stored in the last record. You can, however,
  166.            provide a mask containing a specific number. If that number
  167.            does not already exist anywhere in this field then it will be
  168.            stored. If it does exist, a Btreive error will result.
  169.  
  170.  
  171. USING KEY FIELDS
  172.  
  173. Key fields are fields that are have internal lookup indexs automatically
  174. defined and maintained by the Btreive system. If you want to use the
  175. intelligent loopup `BtrvGet_____' series of commands then the field you
  176. reference must be a key field. You define a key field by adding the
  177. parameter "KEY" as the third parameter on the field defination line.
  178. When specifying a field as a key field you have four optional
  179. configuration parameters, as seen in the previous example. They are:
  180.  
  181.   DUP  - {Duplicates}  This permits the field to have duplicate values
  182.          in multiple records. If this parameter is not specified then no
  183.          two records may have the same value in the affected field. In
  184.          reality, you will almost always specify this parameter when
  185.          defining a key field.
  186.  
  187.   MOD  - {Modifyable}  This allows existing existing field records to be
  188.          modifyed. If this parameter is not specified then once a record
  189.          is written, the affected field is set in stone and changes are
  190.          not permitted.
  191.  
  192.   UPPER- {UpperCase Only}  Used in cunjunction with string fields only,
  193.          this will force all text information to be stored as UPPERCASE.
  194.  
  195.   DEC  - {Decending Order}  This caused the key stored in the affected
  196.          field to be maintained in reverse order.
  197.  
  198.  
  199. If you wanted to use a MarxMenu style database then only the first line
  200. of the above example need be in the file. This would create a file with
  201. a single fixed length key field and put the rest of the fields in the
  202. variable length section. Using the MarxMenu style you can pass anything
  203. you want for the rest of the fields.
  204.  
  205. Category: Btrieve
  206.  
  207.  
  208. BtrvDelete (Handle)
  209. BtrvDelete deletes a record from a data file at the location of the last
  210. data read from the file.
  211.  
  212.  Example:
  213.    BtrvGetEqual(DataVar,'MARC PERKEL',1,Handle)
  214.    BtrvDelete(Handle)
  215.  
  216. See Also: BtrvInsert
  217.  
  218. Category: Btrieve
  219.  
  220.  
  221. BtrvEndTransaction
  222. BtrvEndTransaction is used at the end of a transaction tracking process.
  223. This command updates the files with all the data to be written. Refer to
  224. the BtrvBeginTransaction command for additional information.
  225.  
  226. See Also: BtrvAbortTransaction, BtrvBeginTransaction
  227.  
  228. Category: Btrieve
  229.  
  230.  
  231. BtrvGetEqual (DataVar,Value,Key,Handle)
  232. BtrvGetEqual goes to the previous record of the file based on the key
  233. number that you pass and reads the record matching Value into DataVar.
  234. The type of Value passed has to match the type of data the key for which
  235. the key is defined. If the key is a string then Value is a string. If
  236. BtrvResult is zero, the data was found. If BtrvGetNext is called after
  237. this, the next sequential record based on the key is read.
  238.  
  239.  Example:
  240.    BtrvGetEqual(DataVar,'MARC PERKEL',1,Handle)
  241.  
  242. See Also: BtrvGetLess, BtrvGetLessOrEqu, BtrvGetGreater
  243. See Also: BtrvGetGreaterOrEqu
  244.  
  245. Category: Btrieve
  246.  
  247.  
  248. BtrvGetFirst (DataVar,Key,Handle)
  249. BtrvGetFirst goes to the first record of the file based on the key
  250. number that you pass and reads the record into DataVar. This allows you
  251. to access that database in the sorted order of the key. DataVar is a
  252. MarxMenu variable and the data read creates an array of the fields
  253. stored on disk.
  254.  
  255.  Example:
  256.    ReadAscTextFile('FIELDS.TXT',Fields)
  257.    Handle = BtrvOpen('BBSUSER.BTD',Fields)
  258.  
  259.    BtrvGetFirst(DataVar,1,Handle)
  260.    while BrtvResult = 0
  261.       loop DataVar
  262.          Write DataVar[LoopIndex] ' '
  263.       endloop
  264.       Writeln
  265.       BtrvGetNext(DataVar,1,Handle)
  266.    EndWhile
  267.  
  268. This example dumps the contents of a file to the screen.
  269.  
  270. See Also: BtrvGetLast, BtrvGetNext, BtrvGetPrev
  271.  
  272. Category: Btrieve
  273.  
  274.  
  275. BtrvGetGreater (DataVar,Value,Key,Handle)
  276. BtrvGetGreater goes to the next larger record of the file based on the
  277. key number that you pass and reads the record greater than Value into
  278. DataVar. The type of Value passed has to match the type of data the key
  279. for which the key is defined. If the key is a string then Value is a
  280. string. If BtrvResult is zero, the data was found. If BtrvGetPrev is
  281. called after this, the next sequential record based on the key is read.
  282.  
  283.  Example:
  284.    BtrvGetLess(DataVar,'MARC PERKEL',1,Handle)
  285.  
  286. See Also: BtrvGetEqual, BtrvGetLess, BtrvGetLessOrEqu
  287. See Also: BtrvGetGreaterOrEqu
  288.  
  289. Category: Btrieve
  290.  
  291.  
  292. BtrvGetGreaterOrEqu (DataVar,Value,Key,Handle)
  293. BtrvGetGreaterOrEqu goes to the next larger or equal record of the file
  294. based on the key number that you pass and reads the record greater than
  295. or equal to Value into DataVar. The type of Value passed has to match
  296. the type of data the key for which the key is defined. If the key is a
  297. string then Value is a string. If BtrvResult is zero, the data was
  298. found. If BtrvGetPrev is called after this, the next sequential record
  299. based on the key is read.
  300.  
  301.  Example:
  302.    BtrvGetLessOrEqu(DataVar,'MARC PERKEL',1,Handle)
  303.  
  304. See Also: BtrvGetEqual, BtrvGetLess, BtrvGetLessOrEqu, BtrvGetGreater
  305.  
  306. Category: Btrieve
  307.  
  308.  
  309. BtrvGetLast (DataVar,Key,Handle)
  310. BtrvGetLast goes to the last record of the file based on the key number
  311. that you pass and reads the record into DataVar. This allows you to
  312. access that database in the sorted order of the key. DataVar is a
  313. MarxMenu variable and the data read creates an array of the fields
  314. stored on disk.
  315.  
  316.  Example:
  317.    ReadAscTextFile('FIELDS.TXT',Fields)
  318.    Handle = BtrvOpen('BBSUSER.BTD',Fields)
  319.  
  320.    BtrvGetLast(DataVar,1,Handle)
  321.    while BrtvResult = 0
  322.       loop DataVar
  323.          Write DataVar[LoopIndex] ' '
  324.       endloop
  325.       Writeln
  326.       BtrvGetPrev(DataVar,1,Handle)
  327.    EndWhile
  328.  
  329. This example dumps the contents of a file to the screen backwards.
  330.  
  331. See Also: BtrvGetFirst, BtrvGetNext, BtrvGetPrev
  332.  
  333. Category: Btrieve
  334.  
  335.  
  336. BtrvGetLess (DataVar,Value,Key,Handle)
  337. BtrvGetLess goes to the next smaller record of the file based on the key
  338. number that you pass and reads the record less than Value into DataVar.
  339. The type of Value passed has to match the type of data the key for which
  340. the key is defined. If the key is a string then Value is a string. If
  341. BtrvResult is zero, the data was found. If BtrvGetPrev is called after
  342. this, the next sequential record based on the key is read.
  343.  
  344.  Example:
  345.    BtrvGetLess(DataVar,'MARC PERKEL',1,Handle)
  346.  
  347. See Also: BtrvGetEqual, BtrvGetLessOrEqu, BtrvGetGreater
  348. See Also: BtrvGetGreaterOrEqu
  349.  
  350. Category: Btrieve
  351.  
  352.  
  353. BtrvGetLessOrEqu (DataVar,Value,Key,Handle)
  354. BtrvGetLessOrEqu goes to the next smaller or equal record of the file
  355. based on the key number that you pass and reads the record less than or
  356. equal to Value into DataVar. The type of Value passed has to match the
  357. type of data the key for which the key is defined. If the key is a
  358. string then Value is a string. If BtrvResult is zero, the data was
  359. found. If BtrvGetPrev is called after this, the next sequential record
  360. based on the key is read.
  361.  
  362.  Example:
  363.    BtrvGetLessOrEqu(DataVar,'MARC PERKEL',1,Handle)
  364.  
  365. See Also: BtrvGetEqual, BtrvGetLess, BtrvGetGreater, BtrvGetGreaterOrEqu
  366.  
  367. Category: Btrieve
  368.  
  369.  
  370. BtrvGetNext (DataVar,Key,Handle)
  371. BtrvGetNext goes to the next record of the file based on the key number
  372. that you pass and reads the record into DataVar. This allows you to
  373. access that database in the sorted order of the key. DataVar is a
  374. MarxMenu variable and the data read creates an array of the fields
  375. stored on disk.
  376.  
  377. See Also: BtrvGetFirst, BtrvGetLast, BtrvGetPrev
  378.  
  379. Category: Btrieve
  380.  
  381.  
  382. BtrvGetPrev (DataVar,Key,Handle)
  383. BtrvGetPrev goes to the previous record of the file based on the key
  384. number that you pass and reads the record into DataVar. This allows you
  385. to access that database in the sorted order of the key. DataVar is a
  386. MarxMenu variable and the data read creates an array of the fields
  387. stored on disk.
  388.  
  389. See Also: BtrvGetFirst, BtrvGetLast, BtrvGetNext
  390.  
  391. Category: Btrieve
  392.  
  393.  
  394. BtrvIndexes (Handle) : Number
  395. BtrvIndexes returns the number of key fields in a file. You must open
  396. the file and get a file handle first.
  397.  
  398.  Example:
  399.    Writeln BtrvIndexes (Handle)
  400.  
  401. Category: Btrieve
  402.  
  403.  
  404. BtrvInsert (DataVar,Handle)
  405. BtrvInsert adds a new record to the data file. The data is passed in the
  406. array DataVar. If key fields are used, or if you are using traditional
  407. style fixed length fields, then the first elements of the array must
  408. match the data structure of the file you defined with BtrvCreate. All
  409. elements of the array after these fields are written to the variable
  410. length part of the file. The variable length part can contain MarxMenu
  411. multi-dimensional data structures.
  412.  
  413.  Example:
  414.    BtrvInsert(DataVar,Handle)
  415.  
  416. See Also: BtrvDelete
  417.  
  418. Category: Btrieve
  419.  
  420.  
  421. BtrvOpen (FileName,Fields) : Handle
  422. BtrvOpen is used to open the file for access. Since Btrieve files do not
  423. store a list of fields you have to pass the same data structure you did
  424. when you created the file. If successful, BtrvOpen will return a file
  425. handle. This handle will be referenced by all other commands that access
  426. this file.
  427.  
  428.  Example:
  429.    ReadAscTextFile('FIELDS.TXT',Fields)
  430.    Handle = BtrvOpen('BBSUSER.BTD',Fields)
  431.    If BtrvResult<>0
  432.         WriteLn "Btrieve Error: " BtrvResult " While Opening File."
  433.    EndIf
  434.  
  435. See Also: BtrvClose, BtrvCreate
  436.  
  437. Category: Btrieve
  438.  
  439.  
  440. BtrvPageSize (Handle) : Number
  441. BtrvPageSize returns the page size of in a file. You must open the file
  442. and get a file handle first. The page size is the amount of disk space
  443. allocated when a file is extended.
  444.  
  445.  Example:
  446.    Writeln BtrvPageSize (Handle)
  447.  
  448. Category: Btrieve
  449.  
  450.  
  451. BtrvRecLen (Handle) : Number
  452. BtrvRecLen returns the size of the fixed length part of in a file. You
  453. must open the file and get a file handle first.
  454.  
  455.  Example:
  456.    Writeln BtrvRecLen (Handle)
  457.  
  458. Category: Btrieve
  459.  
  460.  
  461. BtrvRecords (Handle) : Number
  462. BtrvRecords returns the number of records in a file. You must open the
  463. file and get a file handle first.
  464.  
  465.  Example:
  466.    ReadAscTextFile('FIELDS.TXT',Fields)
  467.    Handle = BtrvOpen('CLIENTS.BTR',Fields)
  468.    Writeln BtrvRecords (Handle)           ;# of Records in CLIENTS.BTR
  469.  
  470. Category: Btrieve
  471.  
  472.  
  473. BtrvReset
  474. BtrvReset is used to clear all transactions and close all files. It's a
  475. good idea to start your programs with this command to clear any locks
  476. that might be left out there from other programs that might have
  477. aborted.
  478.  
  479.  Example:
  480.    var fields
  481.  
  482.    btrvreset                           ;Start with a clean slate!
  483.    readasctextfile('db.txt',fields)    ;Get field Definitions
  484.    btrvcreate('phone.mb',fields)       ;Create Btrieve File
  485.    writeln btrvresult                  ;Check for ok
  486.  
  487. Category: Btrieve
  488.  
  489.  
  490. BtrvResult : Number
  491. BtrvResult returns the result code from the last Btrieve call. A zero is
  492. considered a success.
  493.  
  494.  Example:
  495.    Procedure BtrieveError
  496.      If BtrvResult <> 0
  497.        Writeln 'Btrieve Error #',BtrvResult
  498.        Writeln 'Exiting Program...'
  499.        ExitMenu
  500.      EndIf
  501.    EndProc
  502.  
  503. See Also: BtrvResultMessage
  504.  
  505. Category: Btrieve
  506.  
  507.  
  508. BtrvResultMessage : String
  509. BtrvResultMessage automatically returns a string containing an error
  510. message based on the value BtrvResult.
  511.  
  512.  Example:
  513.    Writeln BtrvResultMessage          ;write Btreive Error Message
  514.  
  515. See Also: BtrvResult
  516.  
  517. Category: Btrieve
  518.  
  519.  
  520. BtrvSetOwner (Owner,Mode,Handle)
  521. BtrvSetOwner is really a set password function. It restricts access to
  522. the file unless you pass the owners name by setting BtrvOwner. The mode
  523. controls access and data encryption as follows:
  524.  
  525.    0 : No Btreive access - File Not Encrypted
  526.    1 : Read Only access  - File Not Encrypted
  527.    2 : No Btreive access - File Encrypted
  528.    3 : Read Only access  - File Encrypted
  529.  
  530.  Example:
  531.    BtrvSetOwner('NERD',3,Handle)
  532.  
  533. See Also: BtrvClearOwner
  534.  
  535. Category: Btrieve
  536.  
  537.  
  538. BtrvStepFirst (DataVar,Handle)
  539. BtrvStepFirst goes to the first physical record of the file and reads
  540. the record into DataVar. DataVar is a MarxMenu variable and the data
  541. read creates an array of the fields stored on disk.
  542.  
  543.  Example:
  544.    ReadAscTextFile('FIELDS.TXT',Fields)
  545.    Handle = BtrvOpen('BBSUSER.BTD',Fields)
  546.  
  547.    BtrvStepFirst(DataVar,Handle)
  548.    while BrtvResult = 0
  549.       loop DataVar
  550.          Write DataVar[LoopIndex] ' '
  551.       endloop
  552.       Writeln
  553.       BtrvStepNext(DataVar,Handle)
  554.    EndWhile
  555.  
  556. This example dumps the contents of a file to the screen.
  557.  
  558. See Also: BtrvStepLast, BtrvStepNext, BtrvStepPrev
  559.  
  560. Category: Btrieve
  561.  
  562.  
  563. BtrvStepLast (DataVar,Handle)
  564. BtrvStepLast goes to the last physical record of the file and reads the
  565. record into DataVar. DataVar is a MarxMenu variable and the data read
  566. creates an array of the fields stored on disk.
  567.  
  568.  Example:
  569.    ReadAscTextFile('FIELDS.TXT',Fields)
  570.    Handle = BtrvOpen('BBSUSER.BTD',Fields)
  571.  
  572.    BtrvStepLast(DataVar,Handle)
  573.    while BrtvResult = 0
  574.       loop DataVar
  575.          Write DataVar[LoopIndex] ' '
  576.       endloop
  577.       Writeln
  578.       BtrvStepPrev(DataVar,Handle)
  579.    EndWhile
  580.  
  581. This example dumps the contents of a file to the screen backwards.
  582.  
  583. See Also: BtrvStepFirst, BtrvStepNext, BtrvStepPrev
  584.  
  585. Category: Btrieve
  586.  
  587.  
  588. BtrvStepNext (DataVar,Handle)
  589. BtrvStepNext goes to the next physical record of the file and reads the
  590. record into DataVar. DataVar is a MarxMenu variable and the data read
  591. creates an array of the fields stored on disk.  This is normally used to
  592. work through a file when the search field in not a key field.
  593.  
  594.  Example:
  595.    var fields,temp,handle,vararray
  596.    readasctextfile('data.txt',fields)
  597.    handle=btrvopen('phone.mxb',fields)
  598.    while btrvresult=0
  599.       btrvstepnext(vararray,handle)       ;<- Step to next file record
  600.       writeln vararray[1] " " vararray[2]
  601.    endwhile
  602.    btrvclose(handle)
  603.  
  604. See Also: BtrvStepFirst, BtrvStepLast, BtrvStepPrev
  605.  
  606. Category: Btrieve
  607.  
  608.  
  609. BtrvStepPrev (DataVar,Handle)
  610. BtrvStepPrev goes to the previous physical record of the file and reads
  611. the record into the variable DataVar. DataVar is a MarxMenu variable and
  612. the data read creates an array of the fields stored on disk.
  613.  
  614. See Also: BtrvStepFirst, BtrvStepLast, BtrvStepNext
  615.  
  616. Category: Btrieve
  617.  
  618.  
  619. BtrvStop
  620. BtrvStop is used to unload BTRIEVE.EXE or BREQUEST.EXE from memory. You
  621. can load the requestor before running MarxMenu as a database and unload
  622. the requestor when you are finished. This reclaims the memory the
  623. requestor was using.
  624.  
  625. Category: Btrieve
  626.  
  627.  
  628. BtrvUnusedPages (Handle) : Number
  629. BtrvUnusedPages returns the number of unused pages in a file. You must
  630. open the file and get a file handle first. Unused pages are created when
  631. data is deleted from a file.
  632.  
  633.  Example:
  634.    Writeln BtrvPageSize (Handle)
  635.  
  636. Category: Btrieve
  637.  
  638.  
  639. BtrvUpdate (DataVar,Handle)
  640. BtrvUpdate changes a record in the data file at the last location
  641. accessed with any command that reads a record. The data is passed in the
  642. array DataVar. If key fields are used, or if you are using traditional
  643. style fixed length fields, then the first elemebts of the array must
  644. match the data structure of the file you defined with BtrvCreate. All
  645. elements of the array after these fields are written to the variable
  646. length part of the file. The variable length part can contain MarxMenu
  647. multi-dimensional data structures.
  648.  
  649.  Example:
  650.    BtrvGetEqual(DataVar,'MARC PERKEL',1,Handle)
  651.    if BtrvResult = 0
  652.       DataVar[3] = 37
  653.       BtrvUpdate(DataVar,Handle)
  654.    endif
  655.  
  656. Category: Btrieve
  657.  
  658.  
  659. BtrvVersion : Number
  660. BtrvVersion returns a number representing the version number of Btrieve
  661. that you are using. A zero indicates that Btrieve is not installed. If
  662. Btrieve is installed then it returns 100 times the version number plus
  663. the minor version number. Version 6.0 becomes 600. Version 5.10 becomes
  664. 510.
  665.  
  666.  Example:
  667.    if BtrieveVersion = 0
  668.       Writeln "Sorry, but Btrieve must be loaded first!"
  669.    else
  670.       Writeln "You are running Btrieve Version #: " BtrvVersion
  671.    endif
  672.  
  673. Category: Btrieve
  674.  
  675.